<script>
	function onDivisionChange(){
		var index=document.all['divisionID'].selectedIndex;
		var value=document.all['divisionID'].options[index].value;
		var queryID = (location.href.indexOf("?")+1);
		var query;
		if (queryID)
		{
			query = location.href.substring(queryID);
		}
		if (query) query = '&divisionID='+value+'{$SID}';
		else query = '?divisionID='+value+'{$SID}';
		if(value!=0)
			location.href=location.href + query;
	}

</script>

<div style="visibility:visible;display:block;">
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#000033" width="320" align="center" class="righttable">
	<tr>
		<td class="darkgrey" colspan="5" style="text-align:center;">{$divisionName}</td>
	</tr>
	<tr>
		<td class="black" style="text-align:left;font-weight:bold;font-size:14px;" width="80%"><b><u>Team</u></b></td>
		<td class="black" style="text-align:center;font-weight:bold;font-size:14px;"><b><u>Wins</u></b></td>
		<td class="black" style="text-align:center;font-weight:bold;font-size:14px;"><b><u>Losses</u></b></td>
		<td class="black" style="text-align:center;font-weight:bold;font-size:14px;"><b><u>Ties</u></b></td>
		<td class="black" style="text-align:center;font-weight:bold;font-size:14px;"><b><u>Pct</u></b></td>
	</tr>
	<list:LIST id='standings'>
	<list:ITEM>
	<tr>
    	<td class="black" style="text-align:left;" width="80%">
    	<html:link url="/teamstats" param="teamID" title="view team game results" class="nav">{$teamName}</html:link>
    	</td>
		<td class="black" style="text-align:center;">{$wins}</td>
		<td class="black" style="text-align:center;">{$losses}</td>
		<td class="black" style="text-align:center;">{$ties}</td>
		<td class="black" style="text-align:center;">{$pct}</td>
	</tr>
	</list:ITEM>
	</list:LIST>
</table>

<table border="0" cellpadding="0" cellspacing="0" bgcolor="#000033" width="320" align="center" class="righttable">
	<tr>

		<td class="black" style="text-align:left;" width="20%">Division:</td>
		<td class="black" style="padding-left: 0px" width="80%">
				<select id="divisionID" name="divisionID" class="registration" onchange="onDivisionChange();" style="width:250px;">

					<list:LIST id='divisions'>
					<list:ITEM>
						<option value="{$divisionID}" {$selected_show}>{$divisionName}</option>
					</list:ITEM>
					</list:LIST>
				</select>
                <!--<hr class="rightwhite">  -->
			</td>
		</tr>
    </list:ITEM>
	</list:LIST>
</table>

</div>